﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cherry.Agile.ServiceModel.Monitor {
    public static class ServiceMonitor {
        static bool __master = false;

        static ServiceMonitor() {
            if ( Config.RempServiceModelSection.Current.Service.Usage == "monitor")
                __master = true;
            else
                __master = false;
        }

        public static void Start() {
            if (__master)
                MonitorService.Start();
            else
                StateDispatcher.Start();
        }

        public static void Stop() {
            if (__master)
                MonitorService.Stop();
            else
                StateDispatcher.Stop();
        }
    }
}
